home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
bbs
/
mhis020.zip
/
ACTIVITY.MEX
< prev
next >
Wrap
Text File
|
1996-09-21
|
3KB
|
97 lines
#include <max.mh>
#include "wildcard.mh"
#include "general.mh"
#include "findchar.mh"
#include "date.mh"
#include "callers.mh"
#include "callinfo.mh"
#include "callcrit.mh"
#include "callutil.mh"
void show_list () {
long: calls;
char: nonstop;
struct _callinfo: ci;
int: last_day;
calls := call_numrecs();
// callers.index := callers.index;
reset_more(nonstop);
print(COL_WHITE "Call# Name Node Calls Login Min Up Dn Wr Rd Pg Flags\n"
"────── ───────────────────────── ──── ───── ───── ─── ── ── ── ── ── ─────\n");
// callers.index := first_caller_index ();
while ( (callers.index >= 0 or (callers.forward_search = True))
AND (callers.index < calls or (callers.forward_search = False))
AND call_read(callers.index, ci)
AND kbhit () = False) {
if (meets_criteria (ci, callers.criteria)) {
if (ci.login.date.day <> last_day) {
print (COL_DKGRAY, strpad (" " + COL_GRAY + date_string (ci.login.date) + " ",
usr.width - 1,'─'), '\n');
if (do_more (nonstop, COL_CYAN) = False) return;
last_day := ci.login.date.day;
};
print (COL_WHITE, callers.index);
while (sys.current_col < 8) {
print (' ');
};
print(COL_LCYAN, strpad(ci.name,25,' '),
COL_LMAGENTA, strpadleft(itostr(ci.task),5,' '),
COL_LRED, strpadleft(itostr(ci.calls),6,' '), ' ',
COL_YELLOW, strpad(time_to_string(ci.login.time),6,' '),
COL_WHITE, strpadleft (itostr (time_online (ci) / 60), 3, ' '),
COL_LCYAN, strpadleft(itostr (ci.filesup), 3, ' '),
COL_LBLUE, strpadleft(itostr (ci.filesdn), 3, ' '),
COL_YELLOW, strpadleft(itostr (ci.posted), 3, ' '),
COL_LRED, strpadleft(itostr (ci.read), 3, ' '),
COL_MAGENTA, strpadleft(itostr (ci.paged), 3, ' '), ' ',
COL_LBLUE, strpad(flag_string (ci.flags), 5, ' '),
'\n');
if (do_more (nonstop, COL_CYAN) = False) return;
}
else {
print (COL_WHITE, callers.index);
print (" \x0d");
vidsync ();
};
if (callers.forward_search) {
callers.index := callers.index + 1;
}
else {
callers.index := callers.index - 1;
};
}
if (kbhit ()) {
print (COL_WHITE + "Aborted\n");
while (kbhit ()) getch ();
};
if (callers.index >= calls or callers.index < 0) {
print (COL_WHITE + "End of callers log\n");
};
}
void main() {
string: result;
read_callers ();
id.instant_video := 0;
if (call_open()) {
input_str (result, INPUT_NLB_LINE + INPUT_DEFAULT, 0, 80,
COL_WHITE + "\nEnter call number, date, '=' for current, or <enter> for first: " + COL_CYAN);
callers.index := caller_index_forward (result);
show_list ();
call_close();
}
else {
print ("Cannot open callers.dat!!\n");
};
write_callers ();
}